import 'package:flutter/material.dart';
import 'package:hotfil_pub_web/widgets/my_theme.dart';

import 'package:velocity_x/velocity_x.dart';
import 'package:get/get.dart';

class HomeIncomeCard extends StatelessWidget {
  final num? allIncome;
  final num? availableBalance;
  final num? curSavePower;
  const HomeIncomeCard({
    this.allIncome = 0,
    this.availableBalance = 0,
    this.curSavePower = 0,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 165,
      decoration: const BoxDecoration(
          borderRadius: BorderRadius.only(
            topLeft: Radius.circular(6),
            topRight: Radius.circular(6),
          ),
          image: DecorationImage(
              fit: BoxFit.fill,
              image: AssetImage('assets/images/home/homebanner.png'))),
      child: Padding(
        padding: const EdgeInsets.only(left: 24),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const SizedBox(
              height: 20,
            ),
            'ljsy'.tr.text.color(MyTheme.primaryColorLight).size(12).make(),
            const SizedBox(
              height: 15,
            ),
            allIncome
                .toString()
                .text
                .color(MyTheme.primaryColorDark)
                .size(30)
                .make(),
            const SizedBox(
              height: 25,
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    'ktje'
                        .tr
                        .text
                        .color(MyTheme.primaryColorLight)
                        .size(12)
                        .make(),
                    const SizedBox(
                      height: 6,
                    ),
                    availableBalance
                        .toString()
                        .text
                        .color(MyTheme.primaryColorLight2)
                        .size(12)
                        .make()
                  ],
                ),
                const SizedBox(
                  width: 40,
                ),
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    'dqcl'
                        .tr
                        .text
                        .color(MyTheme.primaryColorLight)
                        .size(12)
                        .make(),
                    const SizedBox(
                      height: 6,
                    ),
                    curSavePower
                        .toString()
                        .text
                        .color(MyTheme.primaryColorLight2)
                        .size(12)
                        .make()
                  ],
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
